{%if esEditor is null%}
{% set esEditor = false%}
{%endif%} 

{%if esEditor %}
    <a class="btn btn-warning  btn-small" href="{{ path( basePath ~'_edit', { 'id': entity.id }) }}">
        <i class="icon-edit"></i> Editar 
    </a>
    <form style="margin-right:-50px" class="span2" action="{{ path( basePath ~'_delete', { 'id': entity.id }) }}" method="post">
        {{ form_widget(delete_form) }}
            <button   class="btn btn-danger to-delete  btn-small delete"  type="submit"><i class="icon-trash"></i> Eliminar</button>
    </form>
{%endif%}